//
//  TZHomeViewModel.m
//  OurFramework
//
//  Created by 949699582 on 2019/8/5.
//  Copyright © 2019 com.cunyin.paywaiter. All rights reserved.
//

#import "TZHomeViewModel.h"

@implementation TZHomeViewModel

-(instancetype)init{
    
    self = [super init];
    if (self) {
        [self initialize];
    }
    return self;
    
}

-(void)initialize{
    
    self.successObject = [RACSubject subject];
    self.failureObject = [RACSubject subject];
    self.dataSource = [TZHomeModel new];
    
}

-(void)exchangeDataWithPage:(int)page andCount:(int)count{
    
    @weakify(self);
    [self.dataSource getDataSuccess:^(NSArray * _Nullable arr) {
        @strongify(self);
        
        [self.successObject sendNext:arr];
    } AndFailure:^(NSString * _Nullable err) {
        
    } page:page count:count];
  
}


@end
